package com.ruoyi.act.service.impl;

import com.ruoyi.act.service.ActHistoryService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.activiti.engine.HistoryService;
import org.activiti.engine.history.HistoricTaskInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActHistoryServiceImpl implements ActHistoryService {
    @Autowired
    private HistoryService historyService;

    public AjaxResult history(String userName){
        List<HistoricTaskInstance> list = historyService.createHistoricTaskInstanceQuery().taskAssignee(userName).list();
        return  AjaxResult.success(list);
    }
}
